<template>
  <div class="pop-dialog-container">
    <div class="pop-dialog-main">
    <el-form label-position="right" :model="parkingChargeForm" :label-width="formLabelWidth" disabled="disabled">
      <el-row>
        <el-col :span="11">
          <el-form-item label="车位号">
            <el-input v-model="parkingChargeForm.parkingAreaNumber"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="单元房号">
            <el-input v-model="parkingChargeForm.residentRoomNumber"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="11">
          <el-form-item label="车牌">
            <el-input v-model="parkingChargeForm.licensePlate"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="使用开始时间">
            <el-input v-model="parkingChargeForm.billingStartDate"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="11">
          <el-form-item label="使用结束时间">
            <el-input v-model="parkingChargeForm.billingEndDate"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="金额">
            <el-input v-model="parkingChargeForm.amount"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="11">
          <el-form-item label="备注">
            <el-input v-model="parkingChargeForm.remark"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="创建时间">
            <el-input v-model="parkingChargeForm.createTime"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    </div>
    <div class="pop-dialog-footer">
      <el-row>
        <el-col :span="12" :offset="6">
          <div class="form-button-container">
            <el-button @click="onBack" type="primary">关闭</el-button>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import parkingChargeApi from '@/api/parkingChargeApi'
export default {
  name: 'ParkingChargeView',
  props: ['id'],
  mixins: [
  ],
  data () {
    return {
      parkingChargeForm: {
      }
    }
  },
  created () {
    if (this.id) {
      parkingChargeApi.findById(this.id)
          .then(resp => {
            if (resp && resp.code === 1) {
              this.parkingChargeForm = resp.data
            } else {
              this.$message.error('获取数据失败')
            }
          })
          .catch(error => {
            console.error('获取数据失败:', error)
          })
    }
  },
  methods: {
    onBack () {
      this.$emit('close-parking-charge-view-event')
    }
  }
}
</script>

<style lang="scss">
</style>